package rsb21411ls.d1113;

public class Demo02 {
    public static void main(String[] args) {
        String []arr ={"刘备","关羽","张飞"};
        for (String x:arr){//增强型
            System.out.println(x);
        }

        System.out.print("[");//普通型
        for (int i=0;i<arr.length;i++){
            System.out.print(arr[i]+" ,");
        }
        System.out.print("]");

        //arr.forEach(f->{System.out.println(f); });
        //foreach为集合特有的 不能用在数组上
    }
}
